<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ title }}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
    <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}">
    <style>
        .question {
            margin-bottom: 20px;
        }
        .question p {
            margin-bottom: 5px;
        }
        .question label {
            margin-right: 10px;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>{{ title }}</h1>
        <div class="instructions"><p>{{ instructions|safe }}</p></div>
        <form method="post">
            {% for question in questions %}
            <div class="question">
                <p><span class="question-id">{{ question.id }}:</span> {{ question.text }}</p>
                <br>
                <div>
                    {{ spectrum.left }}
                    {% for option in options %}
                    <input type="radio" id="q{{ question.id }}_option{{ option.score }}" name="q{{ question.id }}" value="{{ option.score }}" required>
                    <label for="q{{ question.id }}_option{{ option.score }}">{{ option.score }}</label>
                    {% endfor %}
                    {{ spectrum.right }}
                </div>
                <br>
            </div>
            {% endfor %}
            <button type="submit">Abschicken</button>
        </form>
    </div>
</body>
</html>
